<div class="bs-callout bs-callout-info">
    <h4>Edit language</h4>
    <p><a href="<?php echo base_url()?>admin/language">+ Back</a></p>
</div>

<form class="form-horizontal" role="form" method="POST">    
    <div class="form-group">
        <label for="languageName" class="col-sm-2 control-label">Language name</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="languageName" placeholder="Language name" name="languageName" required="true" value="<?php echo $data['languageName'];?>" />
        </div>
    </div>
    
    <div class="form-group">
        <label for="languageCode" class="col-sm-2 control-label">Language code</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="languageCode" placeholder="Language code" name="languageCode" required="true" value="<?php echo $data['languageCode'];?>" />
        </div>
    </div>
    
    <div class="form-group">
        <label for="image" class="col-sm-2 control-label">Icon</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" id="image" placeholder="Icon" name="icon" required="true" value="<?php echo $data['icon'];?>" />
        </div>
        <div class="col-sm-2">
            <input type="button" id="btnSelectImg" class="btn btn-primary" value="Browse server" />
        </div>
    </div>
    
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-primary">Save</button>
        </div>
    </div>
</form>

<script type="text/javascript">
    $(document).ready(function () {
        $("#btnSelectImg").click(function () {
            var finder = new CKFinder();
            finder.selectActionFunction = function (fileUrl) {
                $('#image').val(fileUrl);
            };
            finder.popup();
        });
    });
 </script>
 